package chixing.day05;

public class Car {
    private int carId;
    private String carName;
    private String carBrand;
//若不写无参构造函数 ，只有有参构造函数，则会覆盖无参构造函数
    //若还需要无参构函数，则必须显示写出来
    public Car(){
    }
    public Car(int carId, String carName, String carBrand){
        this();//调用  无参构造函数 必须放在第一行
        this.carId = carId;
        this.carName = carName;
        this.carBrand = carBrand;
    }
    public int fun1(int a, int b){
        return a + b;
    }
    public int fun2(int a, int b,int c){
        int sum=fun1(a,b);
        int result=fun1(sum,c);
        return result;
    }
}
